"""
@Time ： 2022/12/9 9:57
@Auth ： 陈杰 200320501042
@E-mail : 1612845322@qq.com
"""
from sqlalchemy import create_engine
def connect():
    #初始化数据库连接
    engine = create_engine(
        "mysql+pymysql://root:cj2001..@localhost:3306/"
        "bookstore?charset=utf8mb4",
        max_overflow = 0,
        pool_size = 5,
    )
    print("数据库连接成功！") # 输出数据连接
    return engine
if __name__ == "__main__": #作为主程序执行
    connect()